
	<fieldset>
		<legend><?php echo $process_name ?></legend>
	
		<fieldset>
			<legend>Information</legend>
			
			<p>
				<strong>Started by:</strong> <?php echo $started_by ?><br />
				<strong>Start date:</strong> <?php echo $start_date ?><br />
				<strong>End date:</strong> <?php echo $end_date ?>
			</p>
		</fieldset> <!-- end of process/information -->
		
<?php if (isset($stages)): foreach ($stages as $stage): ?>
		
		<fieldset class="stage">
			<legend><a href="#stage_<?php echo $stage['id'] ?>" onclick="showhide('stage_<?php echo $stage['id'] ?>')"><?php echo $stage['name'] ?></a></legend>
			
			<div id="stage_<?php echo $stage['id'] ?>" style="display: none">
				<fieldset>
					<legend>Information</legend>
					
					<p>
						<strong>Done by:</strong> <?php echo $stage['doneby'] ?><br />
						<strong>Start date:</strong> <?php echo $stage['start_date'] ?><br />
						<strong>End date:</strong> <?php echo $stage['end_date'] ?>
					</p>
				</fieldset> <!-- end of process/stage/information -->
				
<?php if (isset($stage['contributions'])): foreach($stage['contributions'] as $contribution): ?>
				
				<fieldset>
					<legend><a href="#contribution_<?php echo $contribution['id'] ?>" onclick="showhide('contribution_<?php echo $contribution['id'] ?>')"><?php echo $contribution['title'] ?></a></legend>
					
					<div id="contribution_<?php echo $contribution['id'] ?>" style="display: none">
						<fieldset>
							<legend>Information</legend>
							
							<p>
								<strong>Added by:</strong> <?php echo $contribution['added_by'] ?><br />
								<strong>Added date:</strong> <?php echo $contribution['added_date'] ?>
							</p>
						</fieldset> <!-- end of process/stage/contribution/information -->
						
						<fieldset>
							<legend>Attributes</legend>
							
							<p>
<?php if (isset($contribution['attributes'])): foreach ($contribution['attributes'] as $attribute): ?>
<?php if ($attribute['type'] == 'password'): ?>
								<strong><?php echo $attribute['name'] ?></strong> <input type="button" onclick="alert('<?php echo $attribute['value'] ?>')" value="Click to see" /><br />
<?php elseif ($attribute['type'] == 'file'): ?>
								<strong><?php echo $attribute['name'] ?></strong> <?php echo $attribute['filename'] ?> (<?php echo $attribute['filesize'] ?>) <input type="button" onclick="document.location='<?php echo site_url('home/download_file/' . $attribute['document_id']) ?>'" value="Download file" />
<?php elseif ($attribute['type'] == 'checkbox'): ?>
								<strong><?php echo $attribute['name'] ?></strong> <?php echo ($attribute['value'] == 'true') ? 'Checked' : 'Not checked' ?><br />
<?php else: ?>
								<strong><?php echo $attribute['name'] ?></strong> <?php echo $attribute['value'] ?><br />
<?php endif; ?>
<?php endforeach; endif; ?>
							</p>
						</fieldset> <!-- end of process/stage/contribution/attributes -->
					</div>
				</fieldset> <!-- end of process/stage/contribution -->
				
<?php endforeach; endif; ?>
				
			</div>
		</fieldset> <!-- end of process/stage -->
		
<?php endforeach; endif; ?>
		
	</fieldset> <!-- end of process -->